#pragma once

#include <jni.h>
#include <android/log.h>

#define  SDK_LOG_TAG    "cosdk"
#define  LOGI(...)  __android_log_print(ANDROID_LOG_INFO,SDK_LOG_TAG,__VA_ARGS__)
#define  LOGE(...)  __android_log_print(ANDROID_LOG_ERROR,SDK_LOG_TAG,__VA_ARGS__)
#define  POS()  LOGI("%s %d", __FUNCTION__, __LINE__)
#define  POSI(arg)  LOGI("%s %d %s", __FUNCTION__, __LINE__, arg)

#ifdef __cplusplus
extern "C" {
#endif

int SdkCallback(void *void_env, int s, int c, char *pMsg);

/*此函数需要放在SDK消息线程内调用*/
void* AttachCurrentThread2JavaVM();
void  DetachCurrentThreadFromJavaVM();

#ifdef __cplusplus   
}
#endif